class TimeSheetDetailModel {
  int? errcode;
  String? errmsg;
  Data? data;
  String? message;

  TimeSheetDetailModel({this.errcode, this.errmsg, this.data, this.message});

  TimeSheetDetailModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = this.message;
    return data;
  }
}

class Data {
  int? id;
  String? name;
  int? projectId;
  String? projectName;
  int? taskId;
  String? taskName;
  String? date;
  String? workHour;
  int? userId;
  String? userName;
  String? image;

  Data(
      {this.id,
        this.name,
        this.projectId,
        this.projectName,
        this.taskId,
        this.taskName,
        this.date,
        this.workHour,
        this.userId,
        this.userName,
        this.image});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    projectId = json['project_id'];
    projectName = json['project_name'];
    taskId = json['task_id'];
    taskName = json['task_name'];
    date = json['date'];
    workHour = json['work_hour'];
    userId = json['user_id'];
    userName = json['user_name'];
    image = json['image'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['project_id'] = this.projectId;
    data['project_name'] = this.projectName;
    data['task_id'] = this.taskId;
    data['task_name'] = this.taskName;
    data['date'] = this.date;
    data['work_hour'] = this.workHour;
    data['user_id'] = this.userId;
    data['user_name'] = this.userName;
    data['image'] = this.image;
    return data;
  }
}
